package com.rowline.admin.module.study.postprocessor;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName:PostProcessorDemo
 * Created by 245167
 * on 2018/4/27  27:27
 * description:
 */
public class PostProcessorDemo {

    public static void main(String[] args) {
        System.out.println("Spring Application 容器初始化开始。。。");
        AbstractApplicationContext applicationcontext = new ClassPathXmlApplicationContext("classpath:/spring-application.xml");
        System.out.println("Spring Application 容器初始化完成！！！");

        SaveStudentsService saveStudentsService = (SaveStudentsService) applicationcontext.getBean("saveStudentsService");
        saveStudentsService.saveStudent();
        applicationcontext.registerShutdownHook();
        System.out.println("关闭 IOC");
    }

}
